﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$page_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$view_charset}" />
<meta name="keywords" content="{$page_keywords}" />
<meta name="Description" content="{$page_description}" />

<!--{css(style.css)}-->

<!--{css(common.css)}-->
<!--{js(common.js)}-->
<!--{js(form.js)}-->
<!--{js(quickview.js)}-->

</head>

<body>
<div class="wrapper"> 
  
  <!--[if lte IE 6]> 
	 <!--{js(DD_belatedPNG.js)}-->
	<script>DD_belatedPNG.fix('.png');DD_belatedPNG.fix('img');
	</script>
<![endif]--> 
  
  <!--{inc (header.view.html)}-->
  
  <div class="main">
    <div class="right">
      <div class="crumbs"><a href="{$site_url}">{$lang.site_home}</a> &gt; {$lang.net_order}</div>
      <div class="page">
        <div class="maintitle">
          <p>{$lang.net_order}</p>
          <span>&nbsp;</span> </div>
        <div class="inquiry">
          <form  name="theForm"  action="<!--{if (!empty($url_id))}--><!--{url ('?app=order&act=editaction)}--><!--{else}--> <!--{url ('?app=order&act=post')}--><!--{/if}-->" method="post"   onsubmit="return doInquirySubmit()">
            <p>{$lang.please_fill_in_basic_information}</p>
            <ul>
              <li>
                <p><font color="#FF0000">*</font>{$lang.company_name}:</p>
                <span><span id="c"> <span class="msgbase">
                <input name="data[company]" type="text" id="companyName" value="{$data.company}" onblur="companyNameCheck('companyName')" size="30" />
                </span> <span class="msg"> <span class="" id="companyNameMsg" style="display:none;"></span> </span> </span></span></li>
              <li>
                <p><font color="#FF0000">*</font>{$lang.call}:</p>
                <span> <span><input type="radio" name="data[sex]" value="1"  <!--{if ($data.sex == 1 || $data.sex == '')}--> checked="checked" <!--{/if}--> />
                <label>{$lang.sex_man}</label>
                <input type="radio" name="data[sex]" id="sex" value="2" <!--{if ($data.sex == 2)}--> checked="checked" <!--{/if}--> />
                <label>{$lang.sex_woman}</label>
                </span> <span id="d"> <span class="msgbase">
                <input name="data[name]" type="text" id="name" onblur="nameCheck('name')" value="{$data.name}" size="14" style="margin-left:10px;" />
                </span> <span class="msg"> <span class="" id="nameMsg" style="display:none;"></span> </span> </span> </span></li>
              <li>
                <p><font color="#FF0000">*</font>{$lang.email}:</p>
                <span><span id="e"> <span class="msgbase">
                <input name="data[email]" type="text" id="email" value="{$data.email}" onblur="emailCheck('email')" size="30" />
                </span> <span class="msg"> <span class="" id="emailMsg" style="display:none;"></span> </span> </span></span></li>
              <li>
                <p><font color="#FF0000">*</font>{$lang.telephone}:</p>
                <span><span id="f"> <span class="msgbase">
                <input name="data[telphone]" type="text" id="tel" value="{$data.telphone}" onblur="telCheck('tel')" size="30" />
                </span> <span class="msg"> <span class="" id="telMsg" style="display:none;"></span> </span> </span></span></li>
              <li>
                <p>{$lang.cellphone}:</p>
                <span><span>
                <input size="30" type="text" value="{$data.cellphone}"  id="cellphone" name="data[cellphone]">
                </span></span></li>
              <li>
                <p>{$lang.detail_address}:</p>
                <span><span>
                <input name="data[address]" type="text" value="{$data.address}" id="address" size="40" />
                </span></span></li>
              <li>
                <p><font color="#FF0000">*</font>{$lang.subscribe_product_describe}:</p>
                <span><span id="b"> <span class="msgbase">
                <textarea name="data[content]" cols="60" rows="8" id="content" onblur="contentCheck('content')">{$data.content}</textarea>
                </span> <span class="msg" style="clear:both; width:400px;"> <span class="" id="contentMsg" style="display:none;"></span> </span> </span></span></li>
              <li>
                <p></p>
                <span>
                <input type="submit" value="{$lang.submit}" name="Submit" >
                <input type="hidden" value="{$url_id}" name="id" >
                <input name="reset" value="{$lang.reset}" type="reset" />
                </span> </li>
            </ul>
          </form>
          <div class="clear"></div>
        </div>
      </div>
    </div>
    <div class="left"> 
      
      <!--{inc (sort_g.view.html)}--> 
      
      <!--{inc (sort_d.view.html)}--> 
      
      <!--{inc (sort_w.view.html)}--> 
      
    </div>
    <div class="clear"></div>
    <div class="mainfoot"></div>
  </div>
  <script type="text/javascript">

var CheResult = true;

function contentCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.content}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}

function companyNameCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.company_name}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}

function nameCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.call}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}

function telCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.telephone}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}

function emailCheck(id){
	CtoH(id);
	if(isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.email}");
		return false;
	}else{
		if(!isEmail(GE(id).value) == true ){
			SetMsg("error",id,"block","{$lang.your_emaill_format_error}");
			return false;
		}else{
			SetMsg("success",id,"none","");
		}
	}
}



function doInquirySubmit(){
	CheResult = true;
	firstErrorControl = "";


	if(contentCheck("content") == false)
		CheResult = false;

	if(companyNameCheck("companyName") == false)
		CheResult = false;

	if(nameCheck("name") == false)
		CheResult = false;

	if(telCheck("tel") == false)
		CheResult = false;

	if(emailCheck("email") == false)
		CheResult = false;

		
	SetMsgFocus();
	return CheResult;
}
//
</script>
  <div class="clear"></div>
  
  <!--{inc (footer.view.html)}-->
  
  <div class="clear"> </div>
</div>
</body>
</html>